package lastRites.ui;

import java.util.HashMap;

import lastRites.enums.CraftingSkill;

public class RecipeManager {
	private static HashMap<String, CraftingRecipe>	registeredRecipes	= new HashMap<>();
	static {
		registerRecipe( new CraftingRecipe( "WOODEN_WALL_01", new ItemStack( Item.WOODEN_WALL_01, 1 ), CraftingSkill.WOODWORKING, new ItemStack( Item.LOGS, 2 ), new ItemStack( Item.ROCKS, 1 ) ) );
	}

	public static boolean registerRecipe(CraftingRecipe newRecipe) {
		if( !registeredRecipes.containsKey( newRecipe.getName() ) ) {
			registeredRecipes.put( newRecipe.getName(), newRecipe );
			return true;
		}
		return false;
	}

	public static CraftingRecipe getRecipe(String name) {
		return registeredRecipes.get( name );
	}
}
